package ru.susu.algebra.field.quadratic;
/**
 * @author akargapolov
 * @since: 18.10.2009
 */
public class QuadraticFieldHelper
{
	public static boolean isSquareByMod(int x, int m)
	{
		x = ((x % m) + m) % m;
		for (long i = 0;i<m;i++)
			if ((i * i) % m == x)
				return true;
		return false;
	}
}
